<div class="bg-light lter b-b wrapper-md">
  <h1 class="m-n font-thin h3">企业列表</h1>
</div>
<div class="panel panel-default">
  <div class="panel-body">
    <div class="col-lg-4">
      <div class="input-group" >
        <div class="input-group-btn" >
          <span class="btn btn-default">企业名称</span>
        </div>
        <input type="text" class="form-control" ng-model="searchform.company_name">
      </div>
    </div>
    <div class="col-lg-2">
      <div class="input-group-static">
        <ui-select ng-model="searchform.status" theme="bootstrap">
          <ui-select-match placeholder="审核状态">{{$select.selected.label}}</ui-select-match>
          <ui-select-choices repeat="item.value as item in searchform.statusList">
            <span ng-bind-html="item.label"></span>
          </ui-select-choices>
        </ui-select>
      </div>
    </div>
    <div class="col-lg-2">
      <button class="btn btn-success" ng-click="search(1)">立即搜索</button>
    </div>
  </div>

  <div class="panel-body">

    <!-- 网络太差, 画圈等 -->
    <h3 class="col-sm-12 text-center" ng-show="searchform.loading">
      <i class="fa fa-spin fa-spinner hide show inline"/>
    </h3>

    <table class="table table-striped table-bordered" ng-show="!searchform.loading">
      <thead>
        <tr>
          <th class="col-md-2 text-center">旅行社名称</th>
          <th class="col-md-1 text-center">编号</th>
          <th class="col-md-1 text-center">执照编号</th>
          <th class="col-md-1 text-center">申报时间</th>
          <th class="col-md-1 text-center">状态</th>
          <th class="col-md-1 text-center"></th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="info in companyList">
          <td>{{info.company_name}}</td>
          <td class="text-center">{{info.company_code}}</td>
          <td class="text-center">{{info.license_code}}</td>
          <td class="text-center">{{info.apply_time}}</td>
          <td class="text-center">{{info.status=='0'?'未审核':info.status=='1'?'通过':'未通过'}}</td>
          <td class="text-center">
            <button type="button" class="btn btn-info btn-xs" ng-click="getInfo(info, false)">详情</button>
            <button type="button" class="btn btn-primary btn-xs" ng-if="info.status == '0'" ng-click="getInfo(info, true)">审核</button>
            <button type="button" class="btn btn-success btn-xs" ng-if="info.status == '1' && info.useable != '0'" ng-click="openAstop(info, '0')">启用</button>
            <button type="button" class="btn btn-danger btn-xs" ng-if="info.status == '1' && info.useable == '0'" ng-click="openAstop(info, '1')">停用</button>
          </td>
        </tr>
      </tbody>
    </table>
    <div class="text-right" ng-show="!searchform.loading" style="background-color: white; margin-right: 30px">
      <pagination total-items="totalItems" ng-model="currentPage" ng-change="search(currentPage, false)" 
       previous-text="上一页" next-text="下一页" first-text="首页" last-text="尾页" max-size="5" 
       boundary-links="true" rotate="false" items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
    </div>
  </div>

</div>
